home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 November
/
Macworld (1999-11).dmg
/
Updaters
/
WhiteCap 3.0.4
/
WhiteCap Source.sit
/
WhiteCap Source
/
Common
/
General Tools
/
XDynArray.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1999-07-13
|
435b
|
31 lines
#include "XDynArray.h"
XDynArray::XDynArray( long inRecSize ) {
mRecSize = inRecSize;
mNumElements = 0;
}
void* XDynArray::operator[] ( const long inIndex ) {
long len;
if ( inIndex >= 0 ) {
len = length();
if ( inIndex >= mNumElements ) {
mNumElements = inIndex + 1;
Append( NULL, ( mNumElements ) * mRecSize - len );
}
return (void*) ( mBuf + inIndex * mRecSize + 1 ); }
else
return NULL;
}